/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.com.wholeconsulting.pacc.gui.utils.table;

import ar.com.wholeconsulting.pacc.model.cabezal.CabezalTorisferico;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author pable
 */
public class CabezalTorisfericoCalculoTableTreeModel extends DefaultTableModel {

    private CabezalTorisferico currentCabezal;

    public CabezalTorisfericoCalculoTableTreeModel(CabezalTorisferico cabezal, Object[][] data, Object[] columnNames) {
        super(data, columnNames);
        currentCabezal = cabezal;
    }

    @Override
    public Object getValueAt(int row, int column) {
        if (column == 0) {
            return super.getValueAt(row, column);
        } else {
            switch (row) {
                case 0:
                    return currentCabezal.getEspesorDeCalculo();
                case 1:
                    return currentCabezal.getDesarrollo();
                case 2:
                    return currentCabezal.getVolumen();
                case 3:
                    return currentCabezal.getPeso();
                default:
                    return null;
            }
        }
    }

    @Override
    public void setValueAt(Object aValue, int row, int column) {
        return;
        //super.setValueAt(aValue, row, column);
    }
}
